						
<!DOCTYPE html>
<html lang="zh-cn">
	<head>
	    <meta charset="utf-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="width=device-width, initial-scale=1">
	    <title></title>
	    <#include "/common/meta.ftl"/>
	    <#include "/common/form.ftl"/>
		<script>
			$(function(){
				$("#cbAll").click(function(){
					$(".CK").prop('checked',$("#cbAll").prop('checked'));
				});
			});
			function hasChecked(){
				var cbs = $(".CK");
				for(var i=0;i<cbs.length;i++){
					if(cbs[i].checked == true){
						return true;
					}
				}
				return false;
			}
			function plDelete(){
				if(!hasChecked()){
					alert("请勾选您要删除的数据！");
				}else{
					if(confirm("您确定要删除这些数据吗？")){
						var cbs = $(".CK");
						var ids = "";
						for(var i=0;i<cbs.length;i++){
							if(cbs[i].checked == true){
								ids += cbs[i].value + ",";
							}
						}
						ids = ids.substring(0,ids.length-1);
						location.href = "./reportResponseDelete?ids="+ids;
					}
					
				}
			}
			function add(){
				location.href = "./reportResponseForm";
			}
			function edit(id){
				location.href = "./reportResponseForm?responseId=" + id;
			}
			function exportExcel(){
				top.openMessager("您确定要导出当前结果集吗？","",true,function(){
					var url = "./reportResponseExport?"+ $("form").serialize();
					top.$("#exportIframe").attr("src", url);
				});
			}
			function setOrder(orderColumn, isAsc){
				$("#orderField").val(orderColumn);
				$("#isAsc").val(isAsc);
				$("#reportResponseListForm").submit();
			}
			function refresh(){
				location.reload();
			}
		</script>
	</head>
	<body style="">
		<div style="padding:5px;">	
		<form id="reportResponseListForm" action="./reportResponseList" method="post">
		<input type="hidden" id="orderField" name="orderField" value="${ orderField!''}" />
		<input type="hidden" id="isAsc" name="isAsc" value="${ isAsc!''}" />
		<div style="margin-bottom:4px;">
			<button class="btn btn-primary" onclick="add();" type="button"><i class="icon icon-plus"></i> 添加</button>
			<button class="btn " onclick="plDelete();" type="button"><i class="icon icon-trash"></i> 批量删除</button>
			<button class="btn btn-primary" onclick="refresh();" type="button"><i class="icon icon-refresh"></i> 刷新</button>
			
			<div style="float:right;margin-bottom:4px;">
			<div class="input-group" style="width:190px;">
		   		<span class="input-group-addon">名称</span> 
		   		<input name="needModify" value="${ needModify!''}" type="text" class="form-control" style="width:120px;">
			  	<span class="input-group-btn">
			    	<button class="btn " type="submit"><i class="icon icon-search"></i> 搜索</button>
			  	</span>
			</div>
			</div>
		</div>
		<table class="table table-hover table-bordered table-condensed" style="margin:0px;">
		  	<thead>
		    	<tr>
		    		<th style="width:40px;text-align:center;">
		    			<input type="checkbox" name="cbAll" id="cbAll" />
		    		</th>
		    		<th style="text-align:center;width:60px;">序号</th>
					<th style="text-align:center;">
					<@newhero.sortColumn orderColumn="r_uid" oldColumn=orderField oldAsc=isAsc >
						举报主键
					</@newhero.sortColumn>
					</th>
					<th style="text-align:center;">
					<@newhero.sortColumn orderColumn="r_uname" oldColumn=orderField oldAsc=isAsc >
						姓名
					</@newhero.sortColumn>
					</th>
					<th style="text-align:center;">
					<@newhero.sortColumn orderColumn="r_content" oldColumn=orderField oldAsc=isAsc >
						意见内容
					</@newhero.sortColumn>
					</th>
					<th style="text-align:center;">
					<@newhero.sortColumn orderColumn="r_date" oldColumn=orderField oldAsc=isAsc >
						回复时间
					</@newhero.sortColumn>
					</th>
						<th style="text-align:center;width:80px;">操作</th>
		    	</tr>
		  	</thead>
	  		<tbody>
	  			<#list data.records as x>
	  			<tr>
	  				<td style="text-align:center;">
	  					<input type="checkbox" class="CK" value="${ x.responseId}"/>
	  				</td>
	  				<td style="text-align:center;">
	  					${ x_index + 1}
	  				</td>
					<td>${ x.rUid!''}</td>
					<td>${ x.rUname!''}</td>
					<td>${ x.rContent!''}</td>
					<td>${ x.rDate!''}</td>
		  				
	  				
					<th style="text-align:center;width:80px;">
						<a href="javascript:edit('${ x.responseId}');">编辑</a>
					</th>
	  			</tr>
	  			</#list>
	  		</tbody>
		</table>
		<#include "/common/page_v1.ftl"/>
		</form>
		</div>
	</body>
</html>